<template>
  <div class="all">
    <div class="all-content">
      <div class="clearfix types-content">
        <div
          class="index-card-container course-container"
          v-for="course in courses2"
          :key="course.coursewareId"
        >
          <router-link
            :to="{name: 'courseware-courseWareDetail',params:course,query:{id:course.coursewareId}}"
          >
            <div class="course-stat">进阶</div>
            <div class="course-card">
              <img :src="course.photo" width="290" height="220" />
            </div>
            <div class="course-card-content">
              <h3>{{course.name}}</h3>
              <div class="course-card-info">
                <span>{{course.firstTag}}</span>
                <span class="r">{{course.collectionNum}}人学过</span>
              </div>
            </div>
            <div class="course_other"></div>
          </router-link>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "all",
  props: ["courses2", "pageTotal", "workType"],
  mounted() {},
  methods: {},
  data() {
    return {
      timeOptions: [
        {
          value: "all",
          label: "全部"
        },
        {
          value: "now",
          label: "最新"
        }
      ]
    };
  }
};
</script>
<style scoped>
.all-slt {
  width: 145px;
  height: 45px;
  margin: 34px 20px 11px 0px;
}
.all {
  display: flex;
  justify-content: center;
}
.all-content {
  width: 1200px;
}

.course-container {
  width: 270px;
  height: 268px;
  position: relative;
}
.course-container .course-stat {
  position: absolute;
  font-size: 12px;
  z-index: 5;
  color: #ffffff;
  line-height: 20px;
  padding: 0 8px;
  background-color: gray;
}
.index-card-container {
  display: inline-block;
  margin-right: 40px;
  margin-bottom: 12px;
}
.index-card-container:nth-child(4n) {
  margin-right: 0;
}
.course-container .course-card {
  width: 268px;
  height: 148px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgb(207, 206, 206);
}
.course-container .course-card-content {
  background-color: #fff;
  padding: 8px;
  border: 1px solid rgb(207, 206, 206);
}
.course-container .course-card-content .course-card-info {
  font-size: 12px;
  color: #9199a1;
  line-height: 18px;
  margin-top: 10px;
  font-weight: 400;
}
.r {
  float: right;
}
</style>
